package com.yywz;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class ShuffleTest {

	public static void main(String[] args) {
		List<Integer> numbers = new ArrayList<Integer>();
		for(int i = 1; i <= 49; i++) {
			numbers.add(i);
		}
		Collections.shuffle(numbers);
		List<Integer> subList = numbers.subList(0, 6);
		Collections.sort(subList);
		System.out.println(subList);
	}

}
